﻿using UtilsORM.MySqlData;
using UtilsORM;
using UtilsORM.MySqlData;

namespace ServiceWeb.DBGateway
{
    public class DBIotProductLanguage
    {
        EFYihongIotContext eFIotBase = new EFYihongIotContext();
        // EFIotGatewayContext ef = new EFIotGatewayContext();

        public List<bs_language_iot_product_item> getPruductLanguage(string pguid, int languagecode)
        {

            List<bs_language_iot_product_item> config_Items =
              (from ci in eFIotBase.bs_language_iot_product_item
               join p in eFIotBase.bs_language_iot_product on ci.lpi_lp_guid equals p.lp_guid
               join l in eFIotBase.bs_language on ci.lpi_l_guid equals l.l_guid
               where p.lp_p_guid == pguid && l.l_code == languagecode
               select ci).ToList();

            return config_Items;

        }
    }
}
